home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nebula 2
/
Nebula Two.iso
/
SourceCode
/
Inspectors
/
InspectMe
/
ThingInspector.h
< prev
next >
Wrap
Text File
|
1995-06-12
|
3KB
|
72 lines
// ThingInspector.h
// By Kevin Brain (ksbrain@zeus.UWaterloo.ca)
// ThingInspector is responsible for the Thing1 and Thing2
// (Tank) attribute inspector views.
// This class is an example of a class that is responsible for
// a set of inspector views in an application. Such classes
// act as intermediaries between the controls of inspector
// views and the currently selected object. These classes
// have outlets to each control in the inspector views it is
// responsible for, and methods that act as the targets for
// each of these controls. This intermediary class is
// necessary because the application can have more than one
// "inspectable views", each which may be "inspected" on a
// particular "inspector view", so we don't directly connect
// the inspector controls to the actual object that the control
// is currently affecting. Instead, the controls are connected
// to the inspSet{*} methods of this class, and these methods
// send a corresponding message to the object itself. They do
// this by sending the message to the 'currentParameterReceiver'.
// This means that a setCurrentParameterReceiver: message must
// be sent to this class when a new object is selected to set
// the object as the currentParameterReceiver. (Another option
// is to have the inspSet{*} methods find out the currently
// selected object (somehow) at the time it is invoked.)
// The reflect{*}Attributes: methods reflect the attributes of an
// object on the controls of a particular inspector view.
// The {*}InspectorNum methods return the inspector number
// assigned to the inspector when it was given to InspectorManager
// in the setupInspectors: method.
// Notice how this class is set up to have only one instance in
// an application. After the first instance of the class is
// created using the 'class method 'new', subsequent calls to
// new return a pointer to this single instance.
#import <objc/Object.h>
@interface ThingInspector:Object
{
id thing1InspectorBox;
id tankInspectorBox;
id currentParameterReceiver;
id inspectorManager;
int thing1InspectorNum;
int tankInspectorNum;
id outNumber;
id outSize;
id outShape;
id outCapacity;
id outHolding;
}
- setupInspectors:(id)mainInspector;
- setCurrentParameterReceiver:(id)newCurrent;
- (unsigned int)thing1InspectorNum;
- (unsigned int)tankInspectorNum;
- reflectThing1Attributes:(id)theObject;
- reflectTankAttributes:(id)theCycle;
- inspSetNumber:sender;
- inspSetSize:sender;
- inspSetShape:sender;
- inspSetCapacity:sender;
- inspSetHolding:sender;
@end